package com.epita.entities;

import java.util.List;

public class Person {
	private String id;
	private String displayName;
	private String nickname;
	private List<PhoneNumber> phoneNumbers;
	private List<Email> emails;
	private String adress;
	private String zipCode;
	private String city;
	private String notes;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getNickname() {
		return nickname;
	}

	public List<PhoneNumber> getPhoneNumbers() {
		return phoneNumbers;
	}

	public void setPhoneNumbers(List<PhoneNumber> phoneNumbers) {
		this.phoneNumbers = phoneNumbers;
	}

	public List<Email> getEmails() {
		return emails;
	}

	public void setEmails(List<Email> emails) {
		this.emails = emails;
	}

	public void setAdress(String adress) {
		this.adress = adress;
	}

	public String getAdress() {
		return adress;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCity() {
		return city;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}

	public String getNotes() {
		return notes;
	}

	public String getFullAdress() {
		String fullAdress;
		String b = "";
		if ((adress == null) && (zipCode == null) && (city == null))
			return null;
		else
			fullAdress = "";
		if (adress != null) {
			fullAdress = adress;
			b = " ";
		}
		if (zipCode != null) {
			fullAdress += b + zipCode;
			b = " ";
		}
		if (city != null) {
			fullAdress += b + city;
		}
		return fullAdress;
	}
}
